﻿<Grid x:Class="Daytimer.Controls.Panes.Calendar.AppointmentEditor"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:Controls="clr-namespace:Daytimer.Controls" xmlns:local="clr-namespace:Daytimer.Controls.Panes.Calendar"
		xmlns:Friction="clr-namespace:Daytimer.Controls.Friction"
		xmlns:Ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300"
		d:DesignWidth="600" Loaded="AppointmentEditor_Loaded" Visibility="Hidden" Background="{DynamicResource White}">
	<Grid.CacheMode>
		<BitmapCache />
	</Grid.CacheMode>
	<Grid.Resources>
		<ResourceDictionary Source="../../CancelEditButton.xaml" />
	</Grid.Resources>
	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="Auto" />
		<ColumnDefinition />
	</Grid.ColumnDefinitions>
	<Grid.RowDefinitions>
		<RowDefinition Height="Auto" />
		<RowDefinition Height="Auto" />
		<RowDefinition Height="*" />
	</Grid.RowDefinitions>
	<local:DayOfWeekHeader x:Name="dayOfWeek" Grid.ColumnSpan="3" />
	<Button x:Name="closeButton" Grid.Column="2" Style="{StaticResource closeButton}" Margin="0,0,4,0"
			VerticalAlignment="Center" Click="closeButton_Click">
		<Button.ToolTip>
			<Ribbon:RibbonToolTip Title="Discard Changes"
					Description="Stop editing this appointment. Any unsaved changes will be lost." />
		</Button.ToolTip>
	</Button>
	<Grid Grid.RowSpan="2" Grid.Row="1" MaxWidth="350">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<Border Grid.RowSpan="3" Grid.ColumnSpan="2" Background="#FFFAFAFA" BorderThickness="0,0,1,0"
				BorderBrush="#FFE1E1E1" IsHitTestVisible="False" />
		<Image Source="pack://application:,,,/Daytimer.Images;component/Images/info_sml.png" Stretch="None"
				HorizontalAlignment="Left" Margin="10,10,0,7" Width="16" Grid.ColumnSpan="2"
				Visibility="{Binding Visibility, ElementName=conflictMessage}" IsHitTestVisible="False" />
		<TextBlock x:Name="conflictMessage" Text="Conflicts with another appointment." Foreground="#FF444444"
				HorizontalAlignment="Left" VerticalAlignment="Center" Margin="30,3,0,0" Visibility="Collapsed"
				IsHitTestVisible="False" Grid.ColumnSpan="2" />
		<Rectangle x:Name="categoryGrid" Grid.Row="1" Grid.ColumnSpan="2" Height="23" Margin="3"
				IsHitTestVisible="False" Visibility="Collapsed" />
		<Rectangle x:Name="categoryRect" Grid.Row="1" Width="6" Height="23" Margin="3,3,0,3" VerticalAlignment="Stretch"
				Fill="#30000000" IsHitTestVisible="False" Visibility="{Binding Visibility, ElementName=categoryGrid}" />
		<TextBlock x:Name="categoryText" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
				HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Margin="12,3,3,3"
				IsHitTestVisible="False" Visibility="{Binding Visibility, ElementName=categoryGrid}" />
		<Friction:FrictionScrollViewerControl Grid.Row="2" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto"
				Margin="0,0,1,0">
			<Grid Margin="10,0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition />
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.Resources>
					<Style x:Key="Header" TargetType="TextBlock">
						<Setter Property="HorizontalAlignment" Value="Left" />
						<Setter Property="FontSize" Value="15" />
						<Setter Property="Margin" Value="0,10" />
						<Setter Property="IsHitTestVisible" Value="False" />
					</Style>
				</Grid.Resources>
				<TextBlock Text="Sync To" Style="{StaticResource Header}" />
				<ComboBox x:Name="calendarSelector" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,0,10" Height="23"
						MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType=Grid}}">
					<ComboBoxItem x:Name="localOnlyCalendar" Content="Don't sync" />
					<!--<ComboBoxItem x:Name="allCalendars" Content="All calendars" />-->
				</ComboBox>
				<TextBlock Text="Location" Grid.Row="2" Style="{StaticResource Header}" />
				<Grid Grid.Row="3" Margin="0,0,0,10" Grid.ColumnSpan="2">
					<Grid.ColumnDefinitions>
						<ColumnDefinition />
						<ColumnDefinition Width="Auto" />
					</Grid.ColumnDefinitions>
					<TextBox x:Name="editLocation" MaxLines="1" TextChanged="editLocation_TextChanged"
							Background="{DynamicResource White}" />
					<Button x:Name="getDirections" Visibility="Collapsed" Margin="5,0,0,0" Width="23" Padding="0"
							MinWidth="0" Grid.Column="1" Click="getDirections_Click">
						<Image HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None"
								Source="pack://application:,,,/Daytimer.Images;component/Images/maplocation.png" />
						<Button.ToolTip>
							<Ribbon:RibbonToolTip Title="Get Directions"
									Description="Get directions and a map to this event location." />
						</Button.ToolTip>
					</Button>
				</Grid>
				<TextBlock Text="When" Grid.Row="4" Style="{StaticResource Header}" />
				<CheckBox x:Name="allDayEvent" Content="All day event" Grid.ColumnSpan="2" HorizontalAlignment="Left"
						Margin="0,0,0,10" Grid.Row="5" VerticalAlignment="Center" Checked="allDayEvent_Checked"
						Unchecked="allDayEvent_Unchecked" />
				<TextBlock Text="Start" Grid.Row="6" IsHitTestVisible="False" />
				<DatePicker x:Name="editStartDate" Grid.Row="7" Margin="0,3,0,10" Height="24"
						DisplayDateEnd="{Binding SelectedDate, ElementName=editEndDate}"
						Background="{DynamicResource White}" SelectedDateChanged="editStartDate_SelectedDateChanged" />
				<Controls:TimeDropDown x:Name="editStartTime" Grid.Row="7" Grid.Column="1" Margin="10,3,0,10"
						Padding="2" Width="120" HorizontalAlignment="Left"
						OnSelectionChanged="editStartTime_OnSelectionChanged" Height="22" />
				<TextBlock Text="End" Grid.Row="8" IsHitTestVisible="False" />
				<DatePicker x:Name="editEndDate" Grid.Row="9" Margin="0,3,0,10" Height="24"
						DisplayDateStart="{Binding SelectedDate, ElementName=editStartDate}"
						Background="{DynamicResource White}" SelectedDateChanged="editEndDate_SelectedDateChanged" />
				<Controls:TimeDropDown x:Name="editEndTime" Grid.Row="9" Grid.Column="1" Margin="10,3,0,10" Padding="2"
						Width="120" HorizontalAlignment="Left" OnSelectionChanged="editEndTime_OnSelectionChanged"
						Height="22" />
				<TextBlock Text="Reminder" Grid.Row="10" Style="{StaticResource Header}" />
				<Controls:MinutesDropDown x:Name="editReminder" Grid.Row="11" Margin="0,0,0,10" Height="22"
						SelectionChanged="editReminder_SelectionChanged" LostFocus="editReminder_LostFocus">
					<ComboBoxItem Content="None" />
					<ComboBoxItem Content="At start time" />
					<ComboBoxItem Content="5 minutes" />
					<ComboBoxItem Content="15 minutes" />
					<ComboBoxItem Content="30 minutes" />
					<ComboBoxItem Content="1 hour" />
					<ComboBoxItem Content="2 hours" />
					<ComboBoxItem Content="4 hours" />
					<ComboBoxItem Content="0.5 days" />
					<ComboBoxItem Content="18 hours" />
					<ComboBoxItem Content="1 day" />
					<ComboBoxItem Content="2 days" />
					<ComboBoxItem Content="4 days" />
					<ComboBoxItem Content="1 week" />
					<ComboBoxItem Content="2 weeks" />
				</Controls:MinutesDropDown>
			</Grid>
		</Friction:FrictionScrollViewerControl>
	</Grid>
	<TextBox x:Name="editSubject" Grid.Row="1" Grid.Column="2" Margin="10" MaxLines="1" SpellCheck.IsEnabled="True"
			BorderThickness="0,0,0,1" Width="Auto" HorizontalAlignment="Left" TextWrapping="Wrap" MinWidth="230"
			Height="NaN" MaxHeight="300" BorderBrush="#FFE1E1E1"
			FontFamily="/Daytimer.Fonts;component/#WeblySleek UI Light" FontSize="20pt"
			VerticalScrollBarVisibility="Auto" Padding="10,2,36,2" GotKeyboardFocus="editSubject_GotKeyboardFocus" />
	<Friction:FrictionRichTextBoxControl x:Name="editDetails" Grid.Column="2" Grid.Row="2" Margin="10,0,10,10"
			SpellCheck.IsEnabled="True" AcceptsReturn="True" AcceptsTab="True" UndoLimit="1024"
			VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="10" FontFamily="Calibri"
			FontSize="14.667" IsDocumentEnabled="True" Foreground="Black" BorderThickness="0">
		<Friction:FrictionRichTextBoxControl.Resources>
			<!--<Style TargetType="{x:Type FlowDocument}">
						<Setter Property="PagePadding" Value="5,15" />
						<Setter Property="PageWidth" Value="8.5in" />
						<Setter Property="PageHeight" Value="11in" />
						<Setter Property="FontFamily" Value="Calibri" />
						<Setter Property="FontSize" Value="14.667" />
					</Style>-->
			<Style TargetType="{x:Type Paragraph}">
				<Setter Property="Margin" Value="0" />
				<Setter Property="BorderBrush" Value="#FF040404" />
			</Style>
			<Controls:UriToolTipConverter x:Key="UriToolTipConverter" />
			<Style TargetType="{x:Type Hyperlink}">
				<EventSetter Event="Click" Handler="Hyperlink_Click" />
				<EventSetter Event="MouseEnter" Handler="Hyperlink_MouseEnter" />
				<EventSetter Event="MouseLeave" Handler="Hyperlink_MouseLeave" />
				<Setter Property="ToolTip"
						Value="{Binding NavigateUri, RelativeSource={RelativeSource Self}, Converter={StaticResource UriToolTipConverter}}" />
			</Style>
			<!--<Style TargetType="{x:Type Image}">
						<Setter Property="MaxWidth" Value="100" />
					</Style>-->
		</Friction:FrictionRichTextBoxControl.Resources>
	</Friction:FrictionRichTextBoxControl>
</Grid>